<template>
  <div id="app">
    <template v-if="!isAuthPage">
      <el-container>
        <Header/>
        <el-main class="main-content">
          <router-view></router-view>
        </el-main>
      </el-container>
    </template>
    <template v-else>
      <router-view></router-view>
    </template>
  </div>
</template>

<script>
import Header from './components/AppHeader.vue'

export default {
  components: {
    Header
  },
  computed: {
    isAuthPage() {
      return ['/login', '/register'].includes(this.$route.path)
    }
  }
}
</script>

<style>
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

body {
  margin: 0;
  padding: 0;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e7eb 100%);
  color: #2c3e50;
}

.el-main {
  padding: 0;
  background: transparent;
}

.el-card {
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.el-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.el-button {
  border-radius: 10px;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: all 0.3s;
}

.el-button--primary {
  background: linear-gradient(45deg, #409EFF, #36D1DC);
  border: none;
  padding: 12px 25px;
}

.el-button--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(64, 158, 255, 0.4);
}

.el-input__inner {
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 12px 15px;
  transition: all 0.3s;
}

.el-input__inner:focus {
  border-color: #409EFF;
  box-shadow: 0 0 0 3px rgba(64, 158, 255, 0.1);
}

.el-message {
  border-radius: 12px;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  padding: 15px 20px;
}

.el-table {
  background: transparent;
  border-radius: 12px;
}

.el-table th {
  background: rgba(0, 0, 0, 0.02);
}

.el-table--striped .el-table__body tr.el-table__row--striped td {
  background: rgba(0, 0, 0, 0.02);
}

.el-tabs__item {
  font-weight: 500;
  padding: 0 25px;
  height: 50px;
  line-height: 50px;
  transition: all 0.3s;
}

.el-tabs__item.is-active {
  color: #409EFF;
  font-weight: 600;
}

.el-tabs__active-bar {
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(45deg, #409EFF, #36D1DC);
}

.el-dialog {
  border-radius: 20px;
  overflow: hidden;
}

.el-dialog__header {
  padding: 20px 25px;
  background: linear-gradient(45deg, #409EFF, #36D1DC);
}

.el-dialog__title {
  color: white;
  font-weight: 600;
}

.el-dialog__body {
  padding: 30px;
}

.el-form-item__label {
  font-weight: 500;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-enter-active {
  animation: fadeIn 0.3s ease-out;
}

* {
  box-sizing: border-box;
}
h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
}
.main-content {
  margin-top: 60px;
  min-height: calc(100vh - 60px);
}
.el-container {
  min-height: 100vh;
}
</style>
